///@file ResultTable.h
///@brief Declaration of the class representing a table of results
///@author Arnaud Duval
///@version 0.0
///@date 2010/05/26


#ifndef RESULTTABLE_H
#define RESULTTABLE_H

#include <cstring>
#include <fstream>


///@class ResultTable
///@brief Class defining a table of results
class ResultTable
{
	private:
		///@brief number of lines
		unsigned int nbLines;
		///@brief number of columns
		unsigned int nbColumns;
		///@brief table of data
		double **data;
		///@brief Title of columns
		std::string *titles;
	public:
		///@brief Default constructor
		ResultTable();
		///@brief Constructor form a text file
		ResultTable(std::string, unsigned int, unsigned int, bool);
		///@brief Destructor
		~ResultTable();
		///@brief Write part of result in an output file
		void WriteResult(std::string, unsigned int, unsigned int*);
		///@brief Write a normalized file
		void WriteFile(std::string);
		///@brief Read a normalized file
		void ReadFile(std::string);
		///@brief Return the line where a maximum value is obtained
		double* GetMaxLine(unsigned int);
		///@brief Return the line where a minimum value is obtained
		double* GetMinLine(unsigned int);
		///@brief Return average value of a columns
		double GetAverage(unsigned int);
		///@brief Return Successives peaks
		double** GetMaxLines(unsigned int, unsigned int&);
		

};

#endif